using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._CartographyTools._Annotation
{
    /// <summary>
    /// <para>Convert Labels To Graphics</para>
    /// <para>Converts labels to graphics for a single layer or an entire map.</para>
    /// <para>将标注转换为单个图层或整个地图的图形。</para>
    /// </summary>    
    [DisplayName("Convert Labels To Graphics")]
    public class ConvertLabelsToGraphics : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ConvertLabelsToGraphics()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_input_map">
        /// <para>Input Map</para>
        /// <para>The input map name.</para>
        /// <para>输入映射名称。</para>
        /// </param>
        /// <param name="_conversion_scale">
        /// <para>Conversion Scale</para>
        /// <para>The scale at which to convert labels. If a reference scale is set on the map, the reference scale will be used for symbol sizing and graphics layer creation, but conversion will happen at this scale.</para>
        /// <para>转换标签的比例。如果在地图上设置了参考比例，则参考比例将用于符号大小调整和图形图层创建，但转换将在此比例下进行。</para>
        /// </param>
        public ConvertLabelsToGraphics(object _input_map, double? _conversion_scale)
        {
            this._input_map = _input_map;
            this._conversion_scale = _conversion_scale;
        }
        public override string ToolboxName => "Cartography Tools";

        public override string ToolName => "Convert Labels To Graphics";

        public override string CallName => "cartography.ConvertLabelsToGraphics";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_input_map, _conversion_scale, _which_layers.GetGPValue(), _single_layer, _graphics_suffix, _extent, _multiple_graphics_layers.GetGPValue(), _generate_unplaced.GetGPValue(), _output_group_layer];

        /// <summary>
        /// <para>Input Map</para>
        /// <para>The input map name.</para>
        /// <para>输入映射名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Map")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _input_map { get; set; }


        /// <summary>
        /// <para>Conversion Scale</para>
        /// <para>The scale at which to convert labels. If a reference scale is set on the map, the reference scale will be used for symbol sizing and graphics layer creation, but conversion will happen at this scale.</para>
        /// <para>转换标签的比例。如果在地图上设置了参考比例，则参考比例将用于符号大小调整和图形图层创建，但转换将在此比例下进行。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Conversion Scale")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _conversion_scale { get; set; }


        /// <summary>
        /// <para>Convert</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to convert graphics for all layers in the map or for a single layer.</para>
        ///   <bulletList>
        ///     <bullet_item>All layers in map—Labels will be converted to graphics for all layers in the map. This is the default.</bullet_item><para/>
        ///     <bullet_item>Single layer—Labels will be converted to graphics for a single layer. The layer must be specified in the Feature Layer parameter (single_layer in Python).</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是转换地图中所有图层的图形还是单个图层的图形。</para>
        ///   <bulletList>
        ///     <bullet_item>地图中的所有图层 - 标注将转换为地图中所有图层的图形。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>单图层 - 标注将转换为单图层的图形。必须在要素图层参数（在 Python 中为 single_layer）中指定图层。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convert")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _which_layers_value _which_layers { get; set; } = _which_layers_value._ALL_LAYERS;

        public enum _which_layers_value
        {
            /// <summary>
            /// <para>All layers in map</para>
            /// <para>All layers in map—Labels will be converted to graphics for all layers in the map. This is the default.</para>
            /// <para>地图中的所有图层 - 标注将转换为地图中所有图层的图形。这是默认设置。</para>
            /// </summary>
            [Description("All layers in map")]
            [GPEnumValue("ALL_LAYERS")]
            _ALL_LAYERS,

            /// <summary>
            /// <para>Single layer</para>
            /// <para>Single layer—Labels will be converted to graphics for a single layer. The layer must be specified in the Feature Layer parameter (single_layer in Python).</para>
            /// <para>单图层 - 标注将转换为单图层的图形。必须在要素图层参数（在 Python 中为 single_layer）中指定图层。</para>
            /// </summary>
            [Description("Single layer")]
            [GPEnumValue("SINGLE_LAYER")]
            _SINGLE_LAYER,

        }

        /// <summary>
        /// <para>Feature Layer</para>
        /// <para>The layer with the labels to convert when the Convert parameter is set to Single layer. This layer must be in the map.</para>
        /// <para>当 Convert 参数设置为单图层时，具有要转换的标注的图层。此图层必须位于地图中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Feature Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _single_layer { get; set; } = null;


        /// <summary>
        /// <para>Graphics Layer Suffix</para>
        /// <para>The suffix that will be added to each new graphics layer. This suffix will be appended to the name of the source feature class for each new graphics layer.</para>
        /// <para>将添加到每个新图形层的后缀。此后缀将追加到每个新图形图层的源要素类名称中。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Graphics Layer Suffix")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _graphics_suffix { get; set; } = null;


        /// <summary>
        /// <para>Extent</para>
        /// <para><xdoc>
        ///   <para>Specifies the extent that contains the labels to convert to graphics.</para>
        ///   <bulletList>
        ///     <bullet_item>Default—The extent will be based on the maximum extent of all participating inputs. This is the default.</bullet_item><para/>
        ///     <bullet_item>Union of Inputs—The extent will be based on the maximum extent of all inputs.</bullet_item><para/>
        ///     <bullet_item>Intersection of Inputs—The extent will be based on the minimum area common to all inputs.</bullet_item><para/>
        ///     <bullet_item>Current Display Extent—The extent is equal to the visible display. The option is not available when there is no active map.</bullet_item><para/>
        ///     <bullet_item>As Specified Below—The extent will be based on the minimum and maximum extent values specified.</bullet_item><para/>
        ///     <bullet_item>Browse—The extent will be based on an existing dataset.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定包含要转换为图形的标签的范围。</para>
        ///   <bulletList>
        ///     <bullet_item>默认值 - 范围将基于所有参与输入的最大范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>输入并集 - 范围将基于所有输入的最大范围。</bullet_item><para/>
        ///     <bullet_item>输入交点 - 范围将基于所有输入共有的最小面积。</bullet_item><para/>
        ///     <bullet_item>当前显示范围 - 范围等于可见显示。当没有活动地图时，该选项不可用。</bullet_item><para/>
        ///     <bullet_item>如下所述 - 范围将基于指定的最小和最大范围值。</bullet_item><para/>
        ///     <bullet_item>浏览 - 范围将基于现有数据集。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _extent { get; set; } = null;


        /// <summary>
        /// <para>Convert labels from all layers to a single output graphics layer</para>
        /// <para><xdoc>
        ///   <para>Specifies whether labels will be converted to individual graphics layers or to a single graphics layer.
        ///   <bulletList>
        ///     <bullet_item>Checked—Labels from all layers will be converted to a single graphics layer.  </bullet_item><para/>
        ///     <bullet_item>Unchecked—Labels will be converted to individual graphics layers that correspond to their layers. This is the default.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是将标签转换为单个图形图层还是转换为单个图形图层。
        ///   <bulletList>
        ///     <bullet_item>选中 - 所有图层的标注将转换为单个图形图层。</bullet_item><para/>
        ///     <bullet_item>未选中 - 标注将转换为与其图层相对应的单个图形图层。这是默认设置。 </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convert labels from all layers to a single output graphics layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _multiple_graphics_layers_value _multiple_graphics_layers { get; set; } = _multiple_graphics_layers_value._false;

        public enum _multiple_graphics_layers_value
        {
            /// <summary>
            /// <para>SINGLE_GRAPHICS_LAYER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("SINGLE_GRAPHICS_LAYER")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>GRAPHICS_LAYER_PER_FEATURE_LAYER</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GRAPHICS_LAYER_PER_FEATURE_LAYER")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Convert unplaced labels to graphics</para>
        /// <para><xdoc>
        ///   <para>Specifies whether graphics will be created from unplaced labels.
        ///   <bulletList>
        ///     <bullet_item>Unchecked—Graphics will only be created for features that are currently labeled. This is the default.  </bullet_item><para/>
        ///     <bullet_item>Checked—Unplaced graphics are stored in the graphics layer with their visibility is turned off.  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>指定是否从未置入的标签创建图形。
        ///   <bulletList>
        ///     <bullet_item>未选中 - 仅为当前标注的要素创建图形。这是默认设置。 </bullet_item><para/>
        ///     <bullet_item>选中 - 未置入的图形存储在图形图层中，其可见性处于关闭状态。</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Convert unplaced labels to graphics")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _generate_unplaced_value _generate_unplaced { get; set; } = _generate_unplaced_value._false;

        public enum _generate_unplaced_value
        {
            /// <summary>
            /// <para>GENERATE_UNPLACED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("GENERATE_UNPLACED")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>ONLY_PLACED</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("ONLY_PLACED")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Output Layer</para>
        /// <para>The group layer that will contain the generated graphics. When working in the Catalog pane, you can use the Save To Layer File tool to write the output group layer to a layer file. When using ArcGIS Pro with a map open, the tool adds the group layer to the display if the Add output dataset to an open map option is checked in the geoprocessing options. The group layer that is created is temporary and will not persist after the session ends unless the project is saved.</para>
        /// <para>将包含生成的图形的图层组。在目录窗格中工作时，可以使用保存至图层文件工具将输出图层组写入图层文件。在打开地图的情况下使用 ArcGIS Pro 时，如果在地理处理选项中选中了将输出数据集添加到打开的地图选项，则该工具会将图层组添加到显示中。创建的图层组是临时的，除非保存工程，否则在会话结束后不会保留。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _output_group_layer { get; set; } = null;


        public ConvertLabelsToGraphics SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}